<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common.jspf"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<!--Import materialize.css-->
		<link type="text/css" rel="stylesheet" href="${ctx}/static/css/materialize.min.css" media="screen,projection" />
		<!-- 导入补充样式 -->
		<link type="text/css" rel="stylesheet" href="${ctx}/static/css/supplement.css" />
		<!-- Material Design图标 -->
		<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

		<!--Let browser know website is optimized for mobile-->
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	</head>

	<body>
		<header>
			<nav>
				<div class="nav-wrapper">
					<div class="col s12" style="padding: 0 0.75em;">
						<a href="#" class="breadcrumb">角色管理</a>
						<a href="#" class="breadcrumb">角色维护</a>
					</div>
				</div>
			</nav>

			<div class="container"></div>
			<%@ include file="/jsp/nav.jsp" %>
		</header>

		<main>
			<div class="row">
				<div class="col s12 m8 110">
					<div class="row"></div>
					<div class="row right">
						<div class="col s12">
							<a class="waves-effect waves-light btn" href="toSaveRole.action">新增角色</a>
						</div>
					</div>

					<div class="row">
						<div class="col s12">
							<div class="card">
								<table class="highlight centered">
									<thead>
										<tr>
											<th data-field="name">角色名称</th>
											<th data-field="description">描述</th>
											<th data-field="operate">操作</th>
										</tr>
									</thead>

									<tbody>
										<c:forEach items="${roles }" var="r" varStatus="status">
                                            <tr>
                                                <td>${r.name}</td>
                                                <td>${r.description}</td>
                                                <td>
                                                    <a class="waves-effect waves-light btn" href="toEditRole.action?id=${r.id}">修改</a>
                                                    <a class="waves-effect waves-light btn" href="deleteRole.action?id=${r.id}">删除</a>
                                                    <a class="waves-effect waves-light btn" href="toAuthorize.action">授权</a>
                                                    <a class="waves-effect waves-light btn" href="toMemberManagement.action">管理成员</a>
                                                </td>
                                            </tr>
                                        </c:forEach>
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</main>

		<script src="${ctx}/static/js/jquery-3.1.0.min.js"></script>
		<script src="${ctx}/static/js/materialize.min.js"></script>
	</body>

</html>